<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>angularjs-study</title>
    <script src="../angular/angular.js"></script>
</head>
<body>
   <!--<div ng-app="" ng-init="name='World'">-->
       <!--Hello {{ name }}！-->
   <!--</div>-->

   <!--<div ng-app="" ng-init="quantity=12;price=5">-->

       <!--总价： {{ quantity * price }}-->

   <!--</div>-->

   <!--<div ng-app=""  ng-init="names=['Tom','Jerry','Gaffey']">-->

       <!--名字为： {{ names[0] }}-->

   <!--</div>-->

   <!--<div ng-app="" ng-init="click=false">-->
       <!--<button ng-click="click= !click">隐藏/显示</button>-->
       <!--<div ng-hide="click">-->
           <!--请输入一个名字：<input type="text" ng-model="name" />-->
           <!--Hello <span ng-bind="name"></span>-->
       <!--</div>-->
   <!--</div>-->


   <!--<div ng-app="" ng-controller="MyController">-->

       <!--请输入一个名字：<input type="text" ng-model="person.name">-->

       <!--Hello <span ng-bind="person.name"></span>-->

   <!--</div>-->

   <!--<script>-->
       <!--function MyController($scope) {-->
           <!--$scope.person = {-->
               <!--name: "World"-->
           <!--};-->
       <!--}-->
   <!--</script>-->

   <!--<div ng-app="" ng-controller="MyController">-->
       <!--Your name:-->
       <!--<input type="text" ng-model="username">-->
       <!--<button ng-click="sayHello()">打招呼</button>-->
       <!--<hr />-->
       <!--{{greeting}}-->
   <!--</div>-->

   <!--<script>-->
       <!--function MyController($scope) {-->
           <!--$scope.username = 'World';-->
           <!--$scope.sayHello = function() {-->
               <!--$scope.greeting= 'Hello ' + $scope.username + '!';-->
           <!--};-->
       <!--}-->
   <!--</script>-->

   <!--<div ng-app="">-->
       <!--请输入: <input type="text" ng-model="name">-->
       <!--结果为： {{ name | currency}}-->
   <!--</div>-->

   <div ng-app="" ng-init="friends = [
   {name:'tom', age:16},
   {name:'jerry', age:20},
   {name:'garfield', age:22}]">

       输入过滤:<input type="text" ng-model="name" >
       <ul style="list-style-type:none">
           <li>   姓名，年龄</li>
           <li  ng-repeat="x in friends | filter:name">
               {{ x.name + ' , ' + x.age }}
           </li>
       </ul>
   </div>

</body>
</html>